class CreateSchools < ActiveRecord::Migration
  def self.up
    create_table :schools do |t|
      t.column :name, :string
      t.column :field_of_study, :string
      t.column :start_date, :date
      t.column :end_date, :date
      t.column :city, :string
      t.column :state, :string
      t.column :user_id, :integer
      t.column :degree_id, :integer
    end
    remove_column :users, :education
    foreign_key :schools, :user_id, :users
  end

  def self.down
    drop_table :schools
    add_column :users, :education, :string
  end
end
